package com.sgb.kjwl.di.material;

import com.sgb.kjwl.repository.MaterialRepertory;
import com.sgb.kjwl.repository.impl.MaterialRepertoryImpl;
import com.sgb.kjwl.view.ui.fragment.home.GoodsCompanyFragment;
import com.sgb.kjwl.view.ui.fragment.home.GoodsMainGoodsListFragment;
import com.sgb.kjwl.view.ui.fragment.home.GoodsMainGoodsListFragment2;
import com.sgb.kjwl.view.ui.fragment.home.GoodsMainGoodsListFragment3;
import com.sgb.kjwl.view.ui.fragment.home.GoodsMainGoodsListFragment4;
import com.sgb.kjwl.view.ui.fragment.material.AllCommodityFragment;
import com.sgb.kjwl.view.ui.fragment.material.AllMaterialListFragment3;
import com.sgb.kjwl.view.ui.fragment.material.AllStFragment3;
import com.sgb.kjwl.view.ui.fragment.material.MaterialListFragment4;
import com.sgb.kjwl.view.ui.fragment.material.STListFragment3;
import com.sgb.kjwl.view.ui.fragment.material.STListFragment4;
import com.sgb.kjwl.view.ui.fragment.material.SelectAllMaterialListFragment3;
import com.sgb.kjwl.viewmodel.home.AllCommodityModule;
import com.sgb.kjwl.viewmodel.home.GoodsCompanyModel;
import com.sgb.kjwl.viewmodel.home.GoodsMainGoodsListModel;
import com.sgb.kjwl.viewmodel.home.GoodsMainGoodsListModel2;
import com.sgb.kjwl.viewmodel.home.GoodsMainGoodsListModel3;
import com.sgb.kjwl.viewmodel.home.GoodsMainGoodsListModel4;
import com.sgb.kjwl.viewmodel.material.AllGoodsMaterialListModel3;
import com.sgb.kjwl.viewmodel.material.AllStModel3;
import com.sgb.kjwl.viewmodel.material.MaterialListFragModel4;
import com.sgb.kjwl.viewmodel.material.STFragListModel3;
import com.sgb.kjwl.viewmodel.material.STFragListModel4;
import com.sgb.kjwl.viewmodel.material.SelectAllGoodsMaterialListModel3;
import com.swgk.core.base.di.Fragment;
import com.swgk.core.base.api.BaseApiSource;
import com.swgk.core.base.model.preference.BasePreferenceSource;

import dagger.Module;
import dagger.Provides;

/**
 * @author Administrator
 */
@Module
public class MaterialFragModule {
    private STListFragment3 stListFragment3;
    private AllMaterialListFragment3 allMaterialListFragment3;
    private AllStFragment3 allStFragment3;
    //新商品fragment
    private MaterialListFragment4 materialListFragment4;
    //新商砼fragment
    private STListFragment4 stListFragment4;
    private SelectAllMaterialListFragment3 selectAllMaterialListFragment3;
    private GoodsMainGoodsListFragment mGoodsMainGoodsListFragment;
    private GoodsMainGoodsListFragment2 mGoodsMainGoodsListFragment2;
    private GoodsMainGoodsListFragment3 mGoodsMainGoodsListFragment3;
    private GoodsMainGoodsListFragment4 mGoodsMainGoodsListFragment4;
    private AllCommodityFragment mAllCommodityFragment;

    private GoodsCompanyFragment goodsCompanyFragment;

    public MaterialFragModule(GoodsCompanyFragment goodsCompanyFragment) {
        this.goodsCompanyFragment = goodsCompanyFragment;
    }

    public MaterialFragModule(GoodsMainGoodsListFragment goodsMainGoodsListFragment) {
        this.mGoodsMainGoodsListFragment = goodsMainGoodsListFragment;
    }

    public MaterialFragModule(GoodsMainGoodsListFragment2 mGoodsMainGoodsListFragment2) {
        this.mGoodsMainGoodsListFragment2 = mGoodsMainGoodsListFragment2;
    }

    public MaterialFragModule(GoodsMainGoodsListFragment3 goodsMainGoodsListFragment) {
        this.mGoodsMainGoodsListFragment3 = goodsMainGoodsListFragment;
    }

    public MaterialFragModule(GoodsMainGoodsListFragment4 goodsMainGoodsListFragment) {
        this.mGoodsMainGoodsListFragment4 = goodsMainGoodsListFragment;
    }

    public MaterialFragModule(STListFragment3 stListFragment3) {
        this.stListFragment3 = stListFragment3;
    }

    public MaterialFragModule(AllMaterialListFragment3 allMaterialListFragment3) {
        this.allMaterialListFragment3 = allMaterialListFragment3;
    }

    public MaterialFragModule(AllStFragment3 allStFragment3) {
        this.allStFragment3 = allStFragment3;
    }

    public MaterialFragModule(MaterialListFragment4 materialListFragment4) {
        this.materialListFragment4 = materialListFragment4;
    }

    public MaterialFragModule(STListFragment4 stListFragment4) {
        this.stListFragment4 = stListFragment4;
    }

    public MaterialFragModule(SelectAllMaterialListFragment3 selectAllMaterialListFragment3) {
        this.selectAllMaterialListFragment3 = selectAllMaterialListFragment3;
    }

    public MaterialFragModule(AllCommodityFragment allCommodityFragment) {
        mAllCommodityFragment = allCommodityFragment;
    }

    @Provides
    @Fragment
    MaterialRepertory provideMaterialRepertory(BaseApiSource apiSource, BasePreferenceSource preferenceSource) {
        return new MaterialRepertoryImpl(apiSource, preferenceSource);
    }

    @Provides
    @Fragment
    STFragListModel3 provideSTFragListModel3(MaterialRepertory materialRepertory) {
        return new STFragListModel3(stListFragment3, materialRepertory);
    }

    @Provides
    @Fragment
    AllGoodsMaterialListModel3 allGoodsMaterialListModel3(MaterialRepertory materialRepertory) {
        return new AllGoodsMaterialListModel3(allMaterialListFragment3, materialRepertory);
    }

    @Provides
    @Fragment
    SelectAllGoodsMaterialListModel3 selectAllGoodsMaterialListModel3(MaterialRepertory materialRepertory) {
        return new SelectAllGoodsMaterialListModel3(selectAllMaterialListFragment3, materialRepertory);
    }

    @Provides
    @Fragment
    AllStModel3 allStModel3(MaterialRepertory materialRepertory) {
        return new AllStModel3(allStFragment3, materialRepertory);
    }

    @Provides
    @Fragment
    MaterialListFragModel4 materialListFragModel4(MaterialRepertory materialRepertory) {
        return new MaterialListFragModel4(materialListFragment4, materialRepertory);
    }

    @Provides
    @Fragment
    STFragListModel4 sTFragListModel4(MaterialRepertory materialRepertory) {
        return new STFragListModel4(stListFragment4, materialRepertory);
    }

    @Provides
    @Fragment
    GoodsMainGoodsListModel goodsMainGoodsListModel(MaterialRepertory repertory) {
        return new GoodsMainGoodsListModel(mGoodsMainGoodsListFragment, repertory);
    }

    @Provides
    @Fragment
    GoodsMainGoodsListModel2 goodsMainGoodsListModel2(MaterialRepertory repertory) {
        return new GoodsMainGoodsListModel2(mGoodsMainGoodsListFragment2, repertory);
    }

    @Provides
    @Fragment
    GoodsMainGoodsListModel3 goodsMainGoodsListModel3(MaterialRepertory repertory) {
        return new GoodsMainGoodsListModel3(mGoodsMainGoodsListFragment3, repertory);
    }

    @Provides
    @Fragment
    GoodsMainGoodsListModel4 goodsMainGoodsListModel4(MaterialRepertory repertory) {
        return new GoodsMainGoodsListModel4(mGoodsMainGoodsListFragment4, repertory);
    }

    @Provides
    @Fragment
    AllCommodityModule allCommodityModule(MaterialRepertory repertory) {
        return new AllCommodityModule(mAllCommodityFragment, repertory);
    }

    @Provides
    @Fragment
    GoodsCompanyModel goodsCompanyModel(MaterialRepertory repertory) {
        return new GoodsCompanyModel(goodsCompanyFragment, repertory);
    }
}
